package at.ac.tuwien.lsds.model;

import java.util.Collection;
import java.util.Observer;

import at.ac.tuwien.lsds.exception.MachineException;

public interface PhysicalMachine extends Observer, Machine{
	/**
	 * starts a new virtual machine
	 * @param hdd size of the vm in mb
	 * @param ram size of the vm in mb
	 * @param cpu size of the vm in mhz
	 */
	public void startVM(Integer hdd, Integer ram, Integer cpu) throws MachineException;
	
	/**
	 * increase the resource size of a random started vm
	 * @param hdd size in mb
	 * @param ram size in mb
	 * @param cpu size in mhz
	 */
	public void increaseVMResources(Integer hdd, Integer ram, Integer cpu) throws MachineException;
	
	/**
	 * sets the resource size of a random started vm
	 * @param hdd size in mb
	 * @param ram size in mb
	 * @param cpu size in mhz
	 */
	public void setVMResources(Integer hdd, Integer ram, Integer cpu) throws MachineException;
	
	/**
	 * gets the power consumption
	 * @return the power consumption as Integer
	 */
	public Float getPowerConsumtion();
	
	/**
	 * gets the count of the running vm's
	 * @return the count of running vm's as Integer
	 */
	public Integer getRunningVMCount();

	/**
	 * gets the applications running on the physical machine
	 * @return all applications that are currently running on the physical machine.
	 */
	public Collection<Application> getApplications();
	

	public void increaseRunningTime();
}
